/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.basic.drive.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.basic.common.constant.enums.ParkBasicSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 开停车处理记录
 *
 * @author pig
 * @date 2023-11-08 15:17:28
 */
@Data
@TableName("base_drive_stop_handle_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "开停车处理记录")
public class BaseDriveStopHandleRecordEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "标识")
    private Long id;

    /**
     * 业务Id
     */
    @Schema(description = "业务Id")
    private Long businessId;

    /**
     * 节点编码
     */
    @Schema(description = "节点编码")
    private Integer nodeCode;

    /**
     * 处理人
     */
    @Schema(description = "处理人")
    private Long handleUserId;

    /**
     * 处理结果
     */
    @Schema(description = "处理结果")
    private String handleResult;

    /**
     * 处理描述
     */
    @Schema(description = "处理描述")
    private String handleResultDesc;

    /**
     * 处理图片
     */
    @Schema(description = "处理图片")
    private String handlePhoto;

    /**
     * 处理视频
     */
    @Schema(description = "处理视频")
    private String handleVideo;

    /**
     * 下一处理人部门
     */
    @Schema(description = "下一处理人部门")
    private Long nextDeptId;

    /**
     * 下一处理人
     */
    @Schema(description = "下一处理人")
    private Long nextUserId;

    /**
     * 执行候选人
     */
    @Schema(description = "执行候选人")
    private String executor;

    /**
     * 处理数据
     */
    @Schema(description = "处理数据")
    private String handleData;

    /**
     * 处理事件
     */
    @Schema(description = "处理事件")
    private Date handleTime;

    /**
     * 签名图片
     */
    @Schema(description = "签名图片")
    private String signature;

    /**
     * 附件
     */
    @Schema(description = "附件")
    private String attachment;

    public String getHandleUserIdStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_user, this.handleUserId);
    }

    public String getNodeCodeStr() {
        return DictResolver.getItemLabelByValue(ParkBasicSysDictEnum.flow_node_status, this.nodeCode);

    }

    public String getExecutorStr() {
        return DictResolver.getItemLabelByValue(AdminDictEnum.sys_user, this.executor);

    }

}
